home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue60 / COMThrd / STAObjectImpl.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-06-02  |  485 b   |  29 lines

  1. unit STAObjectImpl;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, ActiveX, Classes, ComObj, MultipleSTAServer_TLB, StdVcl;
  7.  
  8. type
  9.   TSTAObject = class(TTypedComObject, ISTAObject)
  10.   protected
  11.     procedure Foo; safecall;
  12.     {Declare ISTATest methods here}
  13.   end;
  14.  
  15. implementation
  16.  
  17. uses
  18.   ComServ, STAThread;
  19.  
  20. procedure TSTAObject.Foo;
  21. begin
  22.  
  23. end;
  24.  
  25. initialization
  26.   TTypedComObjectFactory2.Create(ComServer, TSTAObject, Class_STAObject,
  27.     ciMultiInstance, tmApartment);
  28. end.
  29.